import React, { Component } from 'react'
import "./index.scss"
import {connect} from "react-redux"
class Topic extends Component {
  render() {
    return (
      <div className='Topicwrapper clearfix'>
     {
       this.props.list.map((item) => (
      // eslint-disable-next-line jsx-a11y/anchor-is-valid
      <a key={item.get('id')}>
        <img
          className='topic-pic'
          src={item.get('imgUrl')}
          alt=''
        />
        {item.get('title')}
      </a>
    ))}
     </div>
    )
  }
}
const mapState = (state) => ({
	list: state.getIn(['home', 'topicList'])
});
export default connect(mapState, null)(Topic);